package model;

import filter.*;
import graphs.AbstractGraph;
import java.net.URL;
import java.util.List;
import java.util.SortedMap;

/**
 * @author Trevor
 * @author Jeremy
 * 
 */
public interface IInputModule
{

    /**
     * Extract the header information from a given data file, specifically a
     * title and the column names
     * 
     * @param file
     *            : Data file to be inspected
     * @return List containing the title in the first element followed by column
     *         names in later elements
     */
    public List<String> getHeaders(URL path, AbstractGraph<?, ?> displayType);

    /**
     * Given a type of graph, get data from a given file for that graph
     * 
     * @param file
     *            : file to parse data from
     * @param displayType
     *            : Type of graph this method should generate data for
     * @return SortedMap of the same types as the parameters
     */
    public SortedMap<Object, List<Object>> getData(URL path,
            AbstractGraph<?, ?> displayType);

    /**
     * Given a file type, returns a list of the ways to display that file.
     * 
     * @param fileName
     *            : Data file to analyze
     * @return list of displays (bar graph, blot, etc)
     */
    public List<AbstractGraph<?, ?>> getDisplayTypes(URL path);

    /**
     * Given a display type, returns the filters that can be applied
     * 
     * @param displayType
     * @return list of filters (truncate x values, remove outliers, etc)
     */
    public List<IFilter<?, ?>> getFilters(AbstractGraph<?, ?> displayType);

}
